import axios from '@/plugins/axios';
const BASE_API = import.meta.env.VITE_APP_BASE_APIURL as string;

import { CommontTypes, ResponseVo, WxUserTypes } from '@/type';

export namespace ActivityPageService {
  export const pageActivityPage = async (data:any & CommontTypes.IPaginationParam): Promise<ResponseVo<any>> => {
    let res:ResponseVo<any> = await axios.get('/activityPage/page',{params:data, baseURL: BASE_API});
    return res;
  };

  export const addActivityPage = async (data:any): Promise<ResponseVo<any>> => {
    let res:ResponseVo<any> = await axios.post('/activityPage/add',data,{baseURL: BASE_API});
    return res;
  };

  export const detailActivityPage = async (id:string): Promise<ResponseVo<any>> => {
    let res:ResponseVo<any> = await axios.get('/activityPage/detail',{params:{id},baseURL: BASE_API});
    return res;
  };

  export const updateActivityPage = async (data:any): Promise<ResponseVo<any>> => {
    let res:ResponseVo<any> = await axios.post('/activityPage/update',data,{baseURL: BASE_API});
    return res;
  };

  export const deleteActivityPage = async (id:string): Promise<ResponseVo<any>> => {
    let res:ResponseVo<any> = await axios.get('/activityPage/delete',{params:{id},baseURL: BASE_API});
    return res;
  };

}
